package exception;

public class ExceptionApiDemo {
    public static void main(String[] args) {
        System.out.println("开始");

        try {
            String line = "abc";
            System.out.println(Integer.parseInt(line));
        } catch (NumberFormatException e) {
            System.out.println("出错");
            String message = e.getMessage();
//            e.printStackTrace();
            System.out.println(message);        }

        System.out.println("结束");

    }
}
